<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/admintemplate.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditStudentCourseTitle}"></h:outputText>
        </ui:define>
        <ui:define name="leftmenu">
            <h:form>
                <ul class="section menu">
                    <li><a class="menuitem">#{bundle.ControlPanelMenu}</a>
                        <ul class="submenu">
                            <li><h:commandLink action="#{studentCourseController.prepareCreate}" value="#{bundle.ListStudentCourseCreateLink}"/> </li>
                            <li><h:commandLink action="#{studentCourseController.prepareList}" value="#{bundle.CreateStudentCourseShowAllLink}" immediate="true"/> </li>
                        </ul>
                    </li>
                </ul>
            </h:form>
        </ui:define>
        <ui:define name="content">
            <h2>#{bundle.EditStudentCourseTitle}</h2>
            <div class="block">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
                </h:panelGroup>
                <h:form>
                    <table class="form">

                        <tr>
                            <td class="col1">
                                <h:outputLabel value="#{bundle.EditStudentCourseLabel_mark}" for="mark" />
                            </td>
                            <td class="col2">
                                <h:inputText id="mark" value="#{studentCourseController.selected.mark}" title="#{bundle.EditStudentCourseTitle_mark}" required="true" requiredMessage="#{bundle.EditStudentCourseRequiredMessage_mark}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputLabel value="#{bundle.EditStudentCourseLabel_fileUpload}" for="fileUpload" />
                            </td>
                            <td class="col2">
                                <h:inputText id="fileUpload" readonly="true" class="readonly" value="#{studentCourseController.selected.fileUpload}" title="#{bundle.EditStudentCourseTitle_fileUpload}" required="true" requiredMessage="#{bundle.EditStudentCourseRequiredMessage_fileUpload}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputLabel value="#{bundle.EditStudentCourseLabel_students}" for="students" />
                            </td>
                            <td class="col2">
                                <h:inputText id="students" readonly="true" class="readonly" value="#{studentCourseController.selected.students.userName}"></h:inputText>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputLabel value="#{bundle.EditStudentCourseLabel_course}" for="course" />
                            </td>
                            <td class="col2">
                                <h:inputText id="course" readonly="true" class="readonly" value="#{studentCourseController.selected.course.courseName}"></h:inputText>
                            </td>
                        </tr>
                    </table>
                    <h:commandLink action="#{studentCourseController.update}" class="btn-icon btn-teal btn-plus btn-small">
                        <span></span>
                        #{bundle.EditStudentCourseSaveLink}
                    </h:commandLink>&nbsp;
                    <h:link outcome="View" class="btn-icon btn-teal btn-arrow-right btn-small">
                        <span></span>
                        #{bundle.EditStudentCourseViewLink}
                    </h:link>
                </h:form>
            </div>
        </ui:define>
    </ui:composition>

</html>
